# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-cwd-guard
pkgver=0.05
pkgrel=8
pkgdesc="Temporary changing working directory (chdir)"
arch=('any')
url="https://search.cpan.org/dist/Cwd-Guard/"
license=('GPL' 'PerlArtistic')
depends=('perl')
makedepends=('perl-module-build')
checkdepends=('perl-test-requires')
options=('!emptydirs')
source=("https://search.cpan.org/CPAN/authors/id/K/KA/KAZEBURO/Cwd-Guard-$pkgver.tar.gz")
md5sums=('3d9c31722ab475fcb095716fe80c6bb1')

build() {
  cd "$srcdir/Cwd-Guard-$pkgver"
  perl Build.PL installdirs=vendor
  ./Build
}

check() {
  cd "$srcdir/Cwd-Guard-$pkgver"
  ./Build test
}

package() {
  cd "$srcdir/Cwd-Guard-$pkgver"
  ./Build install destdir="$pkgdir"
}
